package com.flyone.fuxiao.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.flyone.fuxiao.model.dto.file.GenerateImgRequest;
import com.flyone.fuxiao.model.dto.img2img.Img2imgRequest;
import com.flyone.fuxiao.model.dto.txt2img.PicturePostQueryRequest;
import com.flyone.fuxiao.model.dto.txt2img.Txt2ImgRequest;
import com.flyone.fuxiao.model.entity.sd.Model;
import com.flyone.fuxiao.model.entity.PicturePost;
import com.baomidou.mybatisplus.extension.service.IService;
import com.flyone.fuxiao.model.entity.User;
import com.flyone.fuxiao.model.entity.sd.Vae;
import com.flyone.fuxiao.model.vo.PostVO;
import com.flyone.fuxiao.model.vo.StarFireResponseVO;
import com.flyone.fuxiao.model.vo.ImgResponseVO;

import javax.servlet.http.HttpServletRequest;

/**
* @author luoyifei
*/
public interface PicturePostService extends IService<PicturePost> {

    /**
     * 生成图片
     * @param generateImgRequest 提示
     * @return 图片地址
     */
    StarFireResponseVO generationImg(GenerateImgRequest generateImgRequest, String token, User loginUser);


    Wrapper<PicturePost> getQueryWrapper(PicturePostQueryRequest picturePostQueryRequest);

    Page<PostVO> getPostVOPage(Page<PicturePost> postPage, HttpServletRequest request);

    /**
     * SD 生成图片
     * @param txt2ImgRequest 请求参数
     * @param loginUser 登录用户
     * @return 图片URL
     */
    ImgResponseVO txt2img(Txt2ImgRequest txt2ImgRequest, String token, User loginUser);

    /**
     * 获取SD模型
     * @return Model[]
     */
    Model[] getSdModels();

    /**
     * 获取VAE模型
     * @return Vae[]
     */
    Vae[] getSdVae();

    String img2img(Img2imgRequest img2imgRequest, String type, User loginUser);

}
